% pictureSearch实现图片检索
function [indexs]=pictureSearch(histMatric,imgIndex)
    indexs=1:1000;
    imgIndex=imgIndex+1;
    indexs(indexs==imgIndex)=[];
    
    imgHist=histMatric(imgIndex,:);
    histMatric(imgIndex,:)=[];
    % 计算距离
    distance=pdist2(imgHist,histMatric,'cosine');
    [distance,indexs]=sort(distance);
    indexs(indexs<imgIndex)=indexs(indexs<imgIndex)-1;
end
